how to find total functions